package pers.qtong.tank;

import java.awt.*;

public class Wall extends GameObject{

    int width;
    int heigth;

    public Rectangle rectangle;

    public Wall(int x, int y, int width, int height) {
        this.x = x;
        this.y = y;
        this.width = width;
        this.heigth = height;

        this.rectangle = new Rectangle(x, y, width, height);
        GameModel.getInstance().add(this);
    }

    @Override
    public void paint(Graphics g) {
        Color color = g.getColor();
        g.setColor(Color.GRAY);
        g.fillRect(x, y, width, heigth);
        g.setColor(color);
    }
}
